package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author yisen
 * @Date 2024/3/7 15:18
 * @PackageName:com.sky.mapper
 * @ClassName: DishFlavorMapper
 * @Description:
 * @Version 1.0
 */
@Mapper
public interface DishFlavorMapper {
    //批量添加口味数据
    public void insertBatch(List<DishFlavor> flavors) ;
    //删除口味表中的数据
    @Delete("delete from dish_flavor where dish_id = #{dishId}")

    void deleteByDishId(Long dishId);
    //查询关联的口味
    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getByDishId(Long dishId);
}
